<!--
Copyright 2017 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<kd-content-card>
  <kd-title>[[Global settings|Global settings header.]]</kd-title>
  <kd-content>
    <form name="$ctrl.globalForm"
          ng-submit="$ctrl.saveGlobal(false)">

      <kd-settings-entry key="[[Cluster name|Cluster name parameter name]]"
                         desc="[[Cluster name appears in the browser window title if it is set|Cluster name parameter description]]">
        <md-input-container md-no-float>
          <input placeholder="[[Cluster name|Cluster name parameter placeholder]]"
                 type="text"
                 aria-label="clusterName"
                 ng-model="$ctrl.global.clusterName">
        </md-input-container>
      </kd-settings-entry>

      <kd-settings-entry key="[[Items per page|Items per page parameter name]]"
                         desc="[[Max number of items that can be displayed on each list page|Items per page parameter description]]">
        <md-slider-container>
          <md-slider md-discrete
                     flex
                     min="5"
                     max="50"
                     step="5"
                     ng-model="$ctrl.global.itemsPerPage"
                     aria-label="itemsPerPage">
          </md-slider>
          <div class="kd-slider-value">{{$ctrl.global.itemsPerPage}}</div>
        </md-slider-container>
      </kd-settings-entry>

      <kd-settings-entry key="[[Auto-refresh time interval|Auto-refresh time interval parameter name]]"
                         desc="[[Number of seconds between every auto-refresh of logs|Auto-refresh time interval parameter description]]">
        <md-slider-container>
          <md-slider md-discrete
                     flex
                     min="1"
                     max="10"
                     step="1"
                     ng-model="$ctrl.global.autoRefreshTimeInterval"
                     aria-label="autoRefreshTimeInterval">
          </md-slider>
          <div class="kd-slider-value">{{$ctrl.global.autoRefreshTimeInterval}}</div>
        </md-slider-container>
      </kd-settings-entry>

      <div class="kd-settings-control-panel">
        <md-button class="md-raised md-primary"
                   type="submit"
                   ng-disabled="$ctrl.globalForm.$pristine">
          [[Save|Save button label]]
        </md-button>
      </div>
    </form>
  </kd-content>
</kd-content-card>
